﻿using MvcModeltest.Data;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;

namespace MvcModeltest.Models
{
    public class ModelDatainitialzerseed:System.Data.Entity.DropCreateDatabaseAlways<MusicDB>
    {
        protected override void Seed(MusicDB context)
        {
            context.Artists.Add(new Artist { Name = "XXXX" });
            context.Genres.Add(new Genre { Name = "XXXX" });
            context.Albums.Add(new Album
            {
                Genre = new Genre { Name = "AA" },
                Artist = new Artist { Name = "AAA" },
                Price = 999.99m,
                Title = "DDD"
            });
            base.Seed(context);
        }

    }
}